package com.cartoon.model;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;

import com.blankj.utilcode.util.SPStaticUtils;

import java.util.List;

import constant.AppConstants;
import model.CarttonKKDirectoryModel;
import model.CarttonKKHistrory;
import model.CarttonLRYDirectoryModel;
import model.CarttonLRYHistrory;

public class CartoonDataViewModel extends androidx.lifecycle.ViewModel {
    private static CartoonDataViewModel instance;
    //    private MutableLiveData<CarttonKKDirectoryModel.DataBean.TopicInfoBean.ComicsBean> data;
    private MutableLiveData<List<CarttonKKDirectoryModel.DataBean.TopicInfoBean.ComicsBean>> kkdata;
    private MutableLiveData <List<CarttonKKHistrory>> kkhistrorydata;


    private MutableLiveData <List<CarttonLRYHistrory>> lryhistrorydata;
    private MutableLiveData<List<CarttonLRYDirectoryModel.DataBean.ChapterListBean>> lrudata;

    private CartoonDataViewModel() {
    }

    public static CartoonDataViewModel getInstance() {
        if (instance == null) {
            instance = new CartoonDataViewModel();
        }
        return instance;
    }

    public MutableLiveData<List<CarttonKKDirectoryModel.DataBean.TopicInfoBean.ComicsBean>> getKKData() {
        if (kkdata == null) {
            kkdata = new MutableLiveData<>();
        }
        return kkdata;
    }

    public MutableLiveData<List<CarttonKKHistrory>> getKKHistroryData() {
        if (kkhistrorydata == null) {
            kkhistrorydata = new MutableLiveData<>();
        }
        return kkhistrorydata;
    }

    public MutableLiveData<List<CarttonLRYHistrory>> getLRYHistroryData() {
        if (lryhistrorydata == null) {
            lryhistrorydata = new MutableLiveData<>();
        }
        return lryhistrorydata;
    }





    public MutableLiveData<List<CarttonLRYDirectoryModel.DataBean.ChapterListBean>> getLRYData() {
        if (lrudata == null) {
            lrudata = new MutableLiveData<>();
        }
        return lrudata;
    }

}